import vm from '@/main';
import config from '@/configure';

export default [
  {
    title: '更换皮肤',
    class: 'vc-icon vc-icon-skin',
    show: false,
    function: () => {
      let [d, g] = ['vc-theme-default', 'vc-theme-green']
      $('body').toggleClass(`${d} ${d}-${config.layout}`).toggleClass(`${g} ${g}-${config.layout}`);
    }
  }, {
    title: '消息提醒',
    class: 'vc-icon vc-icon-msg',
    show: true,
    function: () => {
      vm.$router.push({ name: 'msg' });
    }
  }, {
    title: '修改密码',
    class: 'vc-icon vc-icon-set',
    show: true,
    function: () => {
      vm.$modifyPwd();
    }
  }, {
    title: '退出登录',
    class: 'vc-icon vc-icon-exit',
    show: true,
    function: () => {
      vm.$confirmBox(() => {
        vm.$store.dispatch('logout');
      }, '您确定要退出本次登录吗？');
    }
  }
]